From 4f49d83e43e9944bc1d4c7427f47c8c97433d53e Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Fri, 3 Apr 2020 15:19:37 +0200 Subject: [PATCH] gdk: Move GdkGrabStatus and GdkGrabOwnership decl. With the removal of `gdk_seat_grab` we do not need to keep the definitions of `GdkGrabStatus` and `GdkGrabOwnership` public. Move those definitions to become internal only. --- gdk/broadway/broadway-server.c | 1 + gdk/broadway/gdkbroadway-server.h | 1 + gdk/gdkdeviceprivate.h | 1 + gdk/gdkinternals.h | 39 +++++++++++++++++++++++++++++++ gdk/gdktypes.h | 39 ------------------------------- 5 files changed, 42 insertions(+), 39 deletions(-) diff --git a/gdk/broadway/broadway-server.c b/gdk/broadway/broadway-server.c index 64f3e236de..c444e4f14e 100644 --- a/gdk/broadway/broadway-server.c +++ b/gdk/broadway/broadway-server.c @@ -7,6 +7,7 @@ #include #include #include "gdktypes.h" +#include "gdkinternals.h" #include #include #include diff --git a/gdk/broadway/gdkbroadway-server.h b/gdk/broadway/gdkbroadway-server.h index f399ff458c..e04d90f9b5 100644 --- a/gdk/broadway/gdkbroadway-server.h +++ b/gdk/broadway/gdkbroadway-server.h @@ -3,6 +3,7 @@ #include #include "broadway-protocol.h" +#include "gdkinternals.h" typedef struct _GdkBroadwayServer GdkBroadwayServer; typedef struct _GdkBroadwayServerClass GdkBroadwayServerClass; diff --git a/gdk/gdkdeviceprivate.h b/gdk/gdkdeviceprivate.h index 7e74d38d3e..ea6b3e1a55 100644 --- a/gdk/gdkdeviceprivate.h +++ b/gdk/gdkdeviceprivate.h @@ -22,6 +22,7 @@ #include "gdkdevicetool.h" #include "gdkevents.h" #include "gdkseat.h" +#include "gdkinternals.h" G_BEGIN_DECLS diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h index 21f75d7dc5..73e356170c 100644 --- a/gdk/gdkinternals.h +++ b/gdk/gdkinternals.h @@ -224,6 +224,45 @@ void gdk_synthesize_surface_state (GdkSurface *surface, GdkSurfaceState unset_flags, GdkSurfaceState set_flags); +/** + * GdkGrabStatus: + * @GDK_GRAB_SUCCESS: the resource was successfully grabbed. + * @GDK_GRAB_ALREADY_GRABBED: the resource is actively grabbed by another client. + * @GDK_GRAB_INVALID_TIME: the resource was grabbed more recently than the + * specified time. + * @GDK_GRAB_NOT_VIEWABLE: the grab surface or the @confine_to surface are not + * viewable. + * @GDK_GRAB_FROZEN: the resource is frozen by an active grab of another client. + * @GDK_GRAB_FAILED: the grab failed for some other reason + * + * Returned by gdk_device_grab() to indicate success or the reason for the + * failure of the grab attempt. + */ +typedef enum +{ + GDK_GRAB_SUCCESS = 0, + GDK_GRAB_ALREADY_GRABBED = 1, + GDK_GRAB_INVALID_TIME = 2, + GDK_GRAB_NOT_VIEWABLE = 3, + GDK_GRAB_FROZEN = 4, + GDK_GRAB_FAILED = 5 +} GdkGrabStatus; + +/** + * GdkGrabOwnership: + * @GDK_OWNERSHIP_NONE: All other devices’ events are allowed. + * @GDK_OWNERSHIP_SURFACE: Other devices’ events are blocked for the grab surface. + * @GDK_OWNERSHIP_APPLICATION: Other devices’ events are blocked for the whole application. + * + * Defines how device grabs interact with other devices. + */ +typedef enum +{ + GDK_OWNERSHIP_NONE, + GDK_OWNERSHIP_SURFACE, + GDK_OWNERSHIP_APPLICATION +} GdkGrabOwnership; + GdkGrabStatus gdk_device_grab (GdkDevice *device, GdkSurface *surface, GdkGrabOwnership grab_ownership, diff --git a/gdk/gdktypes.h b/gdk/gdktypes.h index 68f8a8b344..39f38788a0 100644 --- a/gdk/gdktypes.h +++ b/gdk/gdktypes.h @@ -341,45 +341,6 @@ typedef enum GDK_MODIFIER_INTENT_DEFAULT_MOD_MASK, } GdkModifierIntent; -/** - * GdkGrabStatus: - * @GDK_GRAB_SUCCESS: the resource was successfully grabbed. - * @GDK_GRAB_ALREADY_GRABBED: the resource is actively grabbed by another client. - * @GDK_GRAB_INVALID_TIME: the resource was grabbed more recently than the - * specified time. - * @GDK_GRAB_NOT_VIEWABLE: the grab surface or the @confine_to surface are not - * viewable. - * @GDK_GRAB_FROZEN: the resource is frozen by an active grab of another client. - * @GDK_GRAB_FAILED: the grab failed for some other reason - * - * Returned by gdk_device_grab() to indicate success or the reason for the - * failure of the grab attempt. - */ -typedef enum -{ - GDK_GRAB_SUCCESS = 0, - GDK_GRAB_ALREADY_GRABBED = 1, - GDK_GRAB_INVALID_TIME = 2, - GDK_GRAB_NOT_VIEWABLE = 3, - GDK_GRAB_FROZEN = 4, - GDK_GRAB_FAILED = 5 -} GdkGrabStatus; - -/** - * GdkGrabOwnership: - * @GDK_OWNERSHIP_NONE: All other devices’ events are allowed. - * @GDK_OWNERSHIP_SURFACE: Other devices’ events are blocked for the grab surface. - * @GDK_OWNERSHIP_APPLICATION: Other devices’ events are blocked for the whole application. - * - * Defines how device grabs interact with other devices. - */ -typedef enum -{ - GDK_OWNERSHIP_NONE, - GDK_OWNERSHIP_SURFACE, - GDK_OWNERSHIP_APPLICATION -} GdkGrabOwnership; - /** * GdkEventMask: * @GDK_EXPOSURE_MASK: receive expose events -- 2.30.2